<?php require VIEW_PATH."/header.php";?>
<body>
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<div class="hd-menu-list">
    <ul>
        <li class="active"><a href="#">商品管理</a></li>
        <li><a href="<?php echo U('add')?>">添加商品</a></li>
    </ul>
</div>

<table class="hd-table hd-table-list">
    <thead>
    <tr>
        <td class="hd-w50">编号</td>
        <td>商品名称</td>
        <td>上架时间</td>
        <td>栏目</td>
        <td>商品类型</td>
        <td class="hd-w150">操作</td>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($data['data'] as $v){?>
    <tr>
        <td><?php echo $v['goods_id']?></td>
        <td>
        <?php if($v['thumb_pic']){?>
                
        <img src="<?php echo $v['thumb_pic']?>" style="width:50px">
        
               <?php }?>
        <?php echo $v['goods_name']?></td>
        <td><?php echo date('Y/m/d',$v['create_at'])?></td>
        <td>
        <a href="<?php echo U('Admin/Goods/index',array('cat_id'=>$v['cat_id']))?>"><?php echo $v['cat_name']?>
        </a>
        </td>
        <td>#</td>
        <td class="hd-w100">
            <a href="<?php echo U('edit',array('goods_id'=>$v['goods_id']))?>">修改</a> |
            <a href="<?php echo U('edit',array('goods_id'=>$v['goods_id']))?>">库存</a> |
            <a href="#">删除</a>
        </td>
    </tr>
    <?php }?>
    </tbody>
</table>
<div class="pagination">
    <?php echo $data['page']?>
</div>
</body>
</html>